package base.super_study;

public class AdHero extends Hero {
	int moveSpeed=400; //移动速度
    public AdHero(String name){
        super(name);
        System.out.println("AD Hero的构造方法");
    }
    public int getMoveSpeed(){
    	System.out.println("getMoveSpeed:"+this.moveSpeed);
        return this.moveSpeed;
    }
     
    public int getMoveSpeed2(){

    	System.out.println("getMoveSpeed2:"+super.moveSpeed);
        return super.moveSpeed;
    }
	    public static void main(String[] args) {
	    	AdHero a = new AdHero("1");
	    	AdHero b = new AdHero("2");
	    	AdHero c = new AdHero("3");
	    	a.getMoveSpeed();
	    	a.getMoveSpeed2();
	    }
	      //父类Hero只提供了一个有参的构造方法: 但是没有提供无参的构造方法 -----编译报错	
}
